home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-06-24 | 921 b | 28 lines | [TEXT/Help] |
- {••• The following expression LOADS the CODE for Fibonnacci as compiled
- by Help compiler… then hand-translated to MPW Asm… All the files
- from compiler generation to final code are in this directory •••}
-
- ;;; ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;;; ------> PAY ATTENTION TO THE PATH GIVEN in 4th line ! <-----
- ;;; ••••••••••••••••••••••••••••••••••••••••••••••••••••••••••••
- ;;; If it isn't correct, it won't work, and you will get an i/o error
-
- (begin
- (define (fib n))
- (define xref (force (cell 'fib <? 2 1 + fib 1- - ƒ)))
- (define e (getext xref "Fib" ":Help Files:Foreign Code:foreign"))
- (coerce fib (type '(a b)))
- (car=! fib e)
- (cdr=! fib ())
- (print fib)
- (masgc)
- (coerce fib 12)
- (setstrict fib %1))
-
- {••• Try it…
- Timing is on a MacIntosh emulated on an Amiga 2000 (68030/25Mhz) •••}
-
- (chrono (fib 20))
- { = [10946 1.150000000000000000e+0 0.000000000000000000e+0] }
-
-